package chapter_17_command.classic2;

/**
 * @author yaochenglong
 * @date 2017/10/20
 *
 * 抽象命令类
 * 不同与上面的Command类，AbstractCommond持有一个receiver类，使得其子类在创建的时候必须初始化receiver
 */
public abstract class AbstractCommand {

    protected final Receiver receiver;

    public AbstractCommand(Receiver receiver) {
        this.receiver = receiver;
    }

    public abstract void execute();
}
